package com.heima.controller;

import com.heima.common.PageResult;
import com.heima.pojo.dto.NodeDTO;
import com.heima.pojo.vo.NodeVO;
import com.heima.service.NodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/vm-service/node")
@Slf4j
public class NodeController {
    @Autowired
    NodeService nodeService;

    @GetMapping("/search")
    public PageResult<NodeVO> page(NodeDTO nodeDTO){
        log.info("分页查询节点: {}", nodeDTO);
        return nodeService.page(nodeDTO);
    }



}
